MySQL for Python by Lukaszewski Albert;

MySQL for Python by Lukaszewski Albert;

Author:Lukaszewski, Albert;
Language: eng
Format: epub
Publisher: Packt Publishing


These have all been covered in previous chapters. If anything looks unfamiliar, be sure to revisit the relevant chapter before going on.

The basic menu

For this program, we will use two web pages at first. The second page will be automatically generated by the program, but the first will be static.

The first page is a basic dialogue that asks the user to select the action that they want. We want to give the user the choice of creating, dropping, querying, or inserting data into a database.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <title>PyMyAdmin 0.001</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <h1>PyMyAdmin Menu</h1> <form name="input" action="./pymyadmin.py" method="post"> <div>AUTHENTICATION</div> Login: <input type="text" name="user" value=""><br> Password: <input type="password" name="password" value=""> <br><br> <div>DATABASES</div> <input type="radio" name="dbact" value="create"> CREATE<br> <input type="radio" name="dbact" value="drop"> DROP<br> Database name: <input type="text" name="dbname" value=""> <br><br> <div>TABLES</div> <input type="radio" name="tbact" value="create"> CREATE<br> <input type="radio" name="tbact" value="drop"> DROP<br> Database name: <input type="text" name="tbdbname" value=""><br> Table name: <input type="text" name="tbname" value=""> <br><br> <div>QUERIES</div> <input type="radio" name="qact" value="select"> SELECT<br> <input type="radio" name="qact" value="insert"> INSERT<br> Database name: <input type="text" name="qdbname" value=""><br> Table name: <input type="text" name="qtbname" value=""><br> Columns (comma-separated): <input type="text" name="columns" value=""><br> Values (comma-separated): <input type="text" name="values" value=""><br> <input type="submit" value="Submit"> </form> </body> </html>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.